package com.heimdallr.rbac.permission.entity;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author Administrator
 * @date 2016/8/3
 */
public class RoleEntity implements Serializable {

    private int id;
    private String roleName;
    private List<Integer> permissionIds;
    private List<Integer> menuIds;
    private List<PermissionEntity> permissionEntityList;
    private List<MenuEntity> menuEntityList;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public List<PermissionEntity> getPermissionEntityList() {
        return permissionEntityList;
    }

    public void setPermissionEntityList(List<PermissionEntity> permissionEntityList) {
        this.permissionEntityList = permissionEntityList;
    }

    public List<MenuEntity> getMenuEntityList() {
        return menuEntityList;
    }

    public void setMenuEntityList(List<MenuEntity> menuEntityList) {
        this.menuEntityList = menuEntityList;
    }

    public List<Integer> getPermissionIds() {
        return permissionIds;
    }

    public void setPermissionIds(List<Integer> permissionIds) {
        this.permissionIds = permissionIds;
    }

    public List<Integer> getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(List<Integer> menuIds) {
        this.menuIds = menuIds;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoleEntity that = (RoleEntity) o;

        return id == that.id;
    }

    @Override
    public int hashCode() {
        return id;
    }
}
